
# include "dfxGraphicsDevice_OGL.h"

# pragma comment(lib, "../Debug/DFXEngine.lib")

# pragma comment(lib, "OpenGL32.lib")
# pragma comment(lib, "glew32.lib")

# if DFX_PLATFORM == DFX_WINDOWS
    # include <Windows.h>
# endif

namespace DFX
{
    extern "C"
    {
        DFXRESULT DFX_EXPORT_ONLY CreateGraphicsDevice(GraphicsDevice **gd);
    }

# if DFX_PLATFORM == DFX_WINDOWS
    BOOL WINAPI DllEntryPoint(HINSTANCE hDll, DWORD dwReason, LPVOID lpvReserved)
    {
        switch (dwReason)
        {
        case DLL_PROCESS_ATTACH:
            break;

        case DLL_PROCESS_DETACH:
            break;

        default:
            break;
        }

        return TRUE;
    }
# endif
    
    DFXRESULT CreateGraphicsDevice(GraphicsDevice **gd)
    {
        if (!*gd)
        {
            *gd = new GraphicsDevice_OGL();
            return DFX_SUCCESS;
        }

        return DFX_ERROR0;
    }
}